#!/bin/bash
app="ruoyi-admin"
PID=$(ps -ef | grep "$app" | grep -v "grep" | awk '{print $2}')

if [ $? -eq 0 ]; then
    echo "$app process id:$PID"
else
    echo "$app not started"
    exit
fi

kill -15 ${PID}

if [ $? -eq 0 ];then
    echo "$app stopped"
else
    echo "$app stop failed!"
fi